import java.util.Scanner;

public class Main5 {
    public static int getCount(String check, String a) {
        int ret = 0;
        String check2 = new String(check);

        while(check2.indexOf(a) != -1) {
            check2 = check2.substring(check2.indexOf(a) + a.length());
            ret++;
        }
        return ret;
    }
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = Integer.valueOf(in.nextLine());
        String[] arr = new String[n];
        for (int i = 0; i < n; i++) {
            arr[i] = in.nextLine();
        }
        int fa = Integer.valueOf(in.nextLine());
        String str = in.nextLine();
        int total = 0;
        for (int i = 0; i < n; i++) {
            total += getCount(str, arr[i]);
            str = str.replace( arr[i], "<censored>");
        }
        if(total >= fa) {
            System.out.println(total);
            System.out.println("He Xie Ni Quan Jia!");
        } else {
            System.out.println(str);
        }
    }
}
